package com.acceptable.qucun.user.service;

import com.acceptable.qucun.user.entity.User;
import com.acceptable.qucun.user.entity.UserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.http.ResponseEntity;
import org.springframework.lang.NonNull;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 巴斯罗斯·K·赫斯洛利
 * @since 2021-07-15
 */
public interface UserService extends IService<User> {
    void sendVerifyCode(@NonNull Map<String, String> dataMap,
                        @NonNull HttpServletRequest request);

    void registerUnboundByVerifyCode(@NonNull Map<String, String> dataMap);


    String resetPwdBoundByVerifyCode(@NonNull Map<String, String> dataMap);

    UserInfo getUserInfo(@NonNull Integer userId);

    Map<String, Object> getInitInfo(@NonNull Integer userId,
                                    @NonNull Long initDictId);

    Map<String, Object> getInitUserInfo(@NonNull Integer userId);

    Map<String, Object> updateNormalInfo(@NonNull Map<String, String> dataMap);

    void headImgShow(@NonNull HttpServletResponse response,
                     @NonNull Integer userId);

    ResponseEntity<String> headImgDownload(@NonNull Integer userId);

    String headImgUpload(@NonNull Map<String, String> dataMap,
                         @NonNull byte[] imgData);

    String changeEmailVerifyByVerifyCode(@NonNull Map<String, String> dataMap);

    String changeEmailByRedis(@NonNull Map<String, String> dataMap);

    String dropBoundAccountByRedis(@NonNull Map<String, String> dataMap);
}
